package com.examination.framework.utils.impl;

import com.examination.framework.utils.StudentNumberGenerationUtils;

import java.util.Calendar;
import java.util.TimeZone;

/**
 * @author 寇淇芮
 * @Date 2019/11/8 12:08
 */
public class StudentNumberGenerationUtilsImpl implements StudentNumberGenerationUtils {
    @Override
    public String studentNumberGeneration(final String id) {
        //1710070315
        //1810030206

        //获取年
        String instance = String.valueOf(Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00")).get(Calendar.YEAR)).substring(2);
        //
        String substring = id.substring(2);

        return instance;
    }

    public static void main(String[] args) {

        String s = new StudentNumberGenerationUtilsImpl().studentNumberGeneration("1");
        System.out.println(s);
    }
}
